package datastruct;

public class Node {

    private Node left;
    private Node right;
    private String key;
    private String value;
    private int number;
    private boolean color;

    public Node(String key, String value, int number, boolean color) {
        this.key = key;
        this.value = value;
        this.number = number;
        this.color = color;
    }

    public Node() {
    }

    public Node getLeft() {
        return left;
    }

    public void setLeft(Node left) {
        this.left = left;
    }

    public Node getRight() {
        return right;
    }

    public void setRight(Node right) {
        this.right = right;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public boolean isColor() {
        return color;
    }

    public void setColor(boolean color) {
        this.color = color;
    }

    @Override
    public String toString() {
        return "Node{" +
                "left=" + left +
                ", right=" + right +
                ", key='" + key + '\'' +
                ", value='" + value + '\'' +
                ", number=" + number +
                ", color=" + color +
                '}';
    }
}
